Add missing networking runtime configuration switches#52297
Add missing networking runtime configuration switches#52297
Conversation
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
|
There are more network switches (added since the issue was filed probably), The non-HTTP ones should be visible in dotnet/runtime#125385 (that PR only moves the definition, does not add/remove) |
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
… remove UseSocketsHttpHandler section Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
|
@copilot Address this comment: #52297 (comment) by adding the additional switches. |
…nd HttpListener Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Added in c9d8bdb. The new sections cover the additional switches from the runtime source (verified against HTTP:
TLS/SSL:
QUIC:
HttpListener:
|
@MihaZupan would probably know, cc @dotnet/ncl |
|
Looking at the list, that leaves:
|
|
Make changes based on this comment: #52297 (comment) Note that for some switches, there is a practical limit and a different allowed limit. Further, note that some of the switches aren't generally used by most developers. Modulate your edits to point distinguish hard limits, practical advice, and note where switches aren't intended for general developer use. |
…r guidance Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Updated in b205a6d based on @MihaZupan's feedback:
|
BillWagner
left a comment
There was a problem hiding this comment.
This LGTM, and is ready for final review.
There was a problem hiding this comment.
Pull request overview
Updates the .NET runtime networking configuration documentation to cover additional runtimeconfig and environment-variable switches that control HTTP, socket, TLS, QUIC, and HttpListener behaviors.
Changes:
- Adds documentation for missing networking runtime configuration switches (HTTP/3, HTTP/2 flow control, diagnostics propagation, proxy behavior, socket settings, IPv6, TLS, QUIC, and HttpListener).
- Refreshes article metadata (
ms.date) and adds AI usage disclosure (ai-usage). - Improves wording in the existing SPN creation section.
| | **runtimeconfig.json** | `System.Net.Http.SocketsHttpHandler.ProxyPreAuthenticate` | `false` - disabled (default)<br>`true` - enabled | | ||
| | **Environment variable** | `DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_PROXYPREAUTHENTICATE` | `0` - disabled (default)<br>`1` - enabled | |
| | | Setting name | Values | | ||
| | - | - | - | | ||
| | **runtimeconfig.json** | `System.Net.SocketsHttpHandler.Http3Support` | `false` - disabled <br>`true` - enabled | | ||
| | **Environment variable** | `DOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_HTTP3SUPPORT` | `0` - disabled<br/>`1` - enabled | |
| | **runtimeconfig.json** | `System.Net.Http.UsePortInSpn` | `true` - include port number in SPN, for example, `HTTP/host:port`<br>`false` - don't include port in SPN, for example, `HTTP/host` | | ||
| | **Environment variable** | `DOTNET_SYSTEM_NET_HTTP_USEPORTINSPN` | `1` - include port number in SPN, for example, `HTTP/host:port`<br>`0` - don't include port in SPN, for example, `HTTP/host` | |
|
|
||
| ## QUIC configuration caching | ||
|
|
||
| Disables caching of MsQuic configuration objects. When enabled (default), the system caches and reuses configuration objects across connections, which reduces the overhead of TLS and QUIC setup for repeated connections with the same parameters. |
|
|
||
| ## TLS session resumption | ||
|
|
||
| Disables TLS session resumption for <xref:System.Net.Security.SslStream>. Session resumption allows TLS reconnections to skip a full handshake by reusing previously negotiated session parameters, which reduces latency. |
The networking runtime config page (
docs/core/runtime-config/networking.md) only documented two settings despite many more being configurable. This adds the missing switches, verified against the dotnet/runtime source.Added sections
System.Net.SocketsHttpHandler.Http3SupportSystem.Net.SocketsHttpHandler.Http2FlowControl.DisableDynamicWindowSizingtruedisables the algorithm; enabled by defaultDOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_FLOWCONTROL_MAXSTREAMWINDOWSIZEDOTNET_SYSTEM_NET_HTTP_SOCKETSHTTPHANDLER_FLOWCONTROL_STREAMWINDOWSCALETHRESHOLDMULTIPLIERSystem.Net.Http.EnableActivityPropagationtraceparent) for OpenTelemetry; enabled by defaultSystem.Net.SocketsHttpHandler.PendingConnectionTimeoutOnRequestCompletionSystem.Net.Http.SocketsHttpHandler.ProxyPreAuthenticateSystem.Net.SocketsHttpHandler.MaxConnectionsPerServerDOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONSDOTNET_SYSTEM_NET_SOCKETS_THREAD_COUNTSystem.Net.DisableIPv6System.Net.Security.DisableTlsResumeSystem.Net.Security.EnableServerAiaDownloadsSystem.Net.Quic.DisableConfigurationCacheSystem.Net.Quic.AppLocalMsQuicSystem.Net.HttpListener.EnableKernelResponseBufferingAccuracy notes
ParseInt32/DoubleEnvironmentVariableValuerather thanQueryRuntimeSettingSwitch, so noruntimeconfig.jsonkey exists for these.DisableDynamicWindowSizingflag defaults tofalse(algorithm enabled). Setting totruedisables it.UseSocketsHttpHandlersetting was deliberately excluded as it was previously removed from the docs (see Remove/update version 3.1 usage #40601) since it's no longer available in .NET 5+.SslStream.Protocol.cs,MsQuicApi.cs,MsQuicConfiguration.Cache.cs, andHttpListener.Windows.csin the dotnet/runtime source.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews